//
//  UIImage+Utils.h
//  IfengNews
//
//  Created by Shum Louie on 10/10/13.
//
//

#import <UIKit/UIKit.h>
#import <Accelerate/Accelerate.h>
typedef void (^ImageFilterCompleteBlock)(UIImage *result);

@interface UIImage (Utils)
+ (UIImage *)imageWithFileName:(NSString *)fileName;

-(UIImage*)getSubImage:(CGRect)rect;
-(UIImage*)scaleToSize:(CGSize)size;

- (UIImage *)applyLightEffect;
- (UIImage *)applyExtraLightEffect;
- (UIImage *)applyDarkEffect;
- (UIImage *)applyTintEffectWithColor:(UIColor *)tintColor;
- (UIImage *)applyBlurwithLevel:(CGFloat)blur;
- (UIImage *)applyBlurWithRadius:(CGFloat)blurRadius tintColor:(UIColor *)tintColor saturationDeltaFactor:(CGFloat)saturationDeltaFactor maskImage:(UIImage *)maskImage;
//- (void)setImageToBlur: (UIImage *)image
//            blurRadius: (CGFloat)blurRadius
//       completionBlock: (ImageFilterCompleteBlock) completion;
- (UIImage *)blurRadius: (CGFloat)blurRadius;
@end
